add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
Since max_pfn is (rightly) an unsigned long, we overflow for the current
definition of PFN_PHYS. Attached is my preferred solution as it will
hopefully avoid similar situations that may come up in the future.
Signed-off-by: srparish@us.ibm.com
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
-#define PFN_PHYS(x) ((x) << PAGE_SHIFT)
+#define PFN_PHYS(x) ((unsigned long long)(x) << PAGE_SHIFT)
/*
* Reserved space for vmalloc and iomap - defined in asm/page.h